﻿<mui:ModernDialog x:Class="SimlvClient.Pages.ImgList"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:mui="http://firstfloorsoftware.com/ModernUI"
             mc:Ignorable="d" 
             MinWidth="500" MinHeight="500"    WindowStartupLocation="CenterScreen"  Title="图片编辑">
    <Grid Style="{StaticResource ContentRoot}">
        <Grid.RowDefinitions>
            <RowDefinition Height="16" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            
        </Grid.RowDefinitions>
        <ProgressBar Minimum="0" Grid.Row="0" Name="IsBusy" Visibility="Collapsed"  Maximum="1" Height="16" IsIndeterminate="False" Margin="0,0,0,0" >
        </ProgressBar>
        <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Stretch" Margin="5">
           
            <Button Name="BtnDelete" Content="删除" Click="DeleteCommand" Width="75" Margin="5,0,0,0">

            </Button>
        </StackPanel>
        <ScrollViewer Grid.Row="2">
            <StackPanel MinWidth="200">

                <DataGrid x:Name="gridNews" SelectionMode="Single"  AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False"  CanUserReorderColumns="False" >
                    <DataGrid.Columns>

                        <DataGridTextColumn IsReadOnly="True" Header="编号" Binding="{Binding Path=Id}"/>
                        <DataGridTextColumn IsReadOnly="True" Width="400" Header="Url" Binding="{Binding Path=ImageUrl}" />
                        <DataGridTemplateColumn Header="描述" Width="Auto" IsReadOnly="True" >
                            <DataGridTemplateColumn.CellTemplate>
                                <DataTemplate>
                                    <Image Source="{Binding Path=ImageUrl}" Width="100" Height="100"></Image>
                                </DataTemplate>
                            </DataGridTemplateColumn.CellTemplate>
                        </DataGridTemplateColumn>
                       
                    </DataGrid.Columns>
                </DataGrid>
            </StackPanel>
        </ScrollViewer>
    </Grid>
</mui:ModernDialog>
